package com.mendmix.tutorial.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mendmix.amqp.MQInstanceDelegate;
import com.mendmix.amqp.MQMessage;
import com.mendmix.common.annotation.ApiMetadata;
import com.mendmix.common.constants.PermissionLevel;
import com.mendmix.common.model.ValueParam;

/**
 * 
 * <br>
 * Class Name   : DemoController
 *
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

	@ApiMetadata(permissionLevel = PermissionLevel.LoginRequired)
	@GetMapping("pubEvent")
	public void pubEvent() {
		MQInstanceDelegate.send(new MQMessage("demo-topic", new ValueParam(String.valueOf(System.currentTimeMillis()))));
	}

	
	
}
